<?php
ob_clean();
ob_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<h1>Outstanding Jobs Alert , Date : <?php echo $this->dateToday;?></h1>
<?php foreach($this->arrUnFinish as $shop => $detail){?>
<table width="800" border="1" cellspacing="0" cellpadding="10">
  <tr>
    <th colspan="3" scope="col">SHOP : <?php echo $shop;?></th>
  </tr>
 <?php foreach ($detail as $no => $dLine){?>
  <tr>
    <td><?php echo $no + 1;?></td>
    <td><?php echo $dLine[0];?></td>
    <td><?php echo $dLine[1];?> <?php echo $dLine[2];?></td>
  </tr>
  <?php } ?>
</table>
<?php } ?>
</body>
</html>
<?php 

$mailbody = ob_get_contents();

if($this->sendmail == 'yes'){
	$newMail = new Model_Emailshandler();
	$newMail->sendNormalEmail($this->email,$this->subject,$mailbody);
	}
	

?>